var formatDateTime = function (date) {
    var y = date.getFullYear();
    var m = date.getMonth() + 1;
    m = m < 10 ? ('0' + m) : m;
    var d = date.getDate();
    d = d < 10 ? ('0' + d) : d;
    var h = date.getHours();
    h = h < 10 ? ('0' + h) : h;
    var minute = date.getMinutes();
    minute = minute < 10 ? ('0' + minute) : minute;
    var second = date.getSeconds();
    second = second < 10 ? ('0' + second) : second;
    return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
};
var formatDate = function (date) {
    var y = date.getFullYear();
    var m = date.getMonth() + 1;
    m = m < 10 ? '0' + m : m;
    var d = date.getDate();
    d = d < 10 ? ('0' + d) : d;
    return y + '-' + m + '-' + d;
};

var GetQueryString = function (name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return decodeURI(r[2]); return "";
};

var GetBugLevel = function (level) {
    if (level == 1) return "紧急重要"
    if (level == 2) return "紧急不重要"
    if (level == 3) return "不紧急重要"
    if (level == 4) return "不紧急不重要"
    return "未知"
};

var GetBugState = function (state) {
    if (state == 1) return "未解决"
    if (state == 2) return "已修改未验证"
    if (state == 3) return "不解决"
    if (state == 4) return "已解决"
    return "未知"
};

var GetBaseUrl=function()
{
    return "http://localhost:8082/"
};